package org.huhuiyu.easyui.service.impl;

import java.util.List;

import org.huhuiyu.easyui.enity.EmployeeModel;
import org.huhuiyu.easyui.service.EmployeeService;
import org.huhuiyu.easyui.dao.EmployeeDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeServiceImpl implements EmployeeService {

	@Autowired
	private EmployeeDAO employeeDAO;

	public EmployeeServiceImpl() {
	}

	public void setEmployeeDAO(EmployeeDAO employeeDAO) {
		this.employeeDAO = employeeDAO;
	}

	public EmployeeDAO getEmployeeDAO() {
		return employeeDAO;
	}

	@Override
	public void deleteEmployeeModel(EmployeeModel employeeModel)
			throws Exception {
		employeeDAO.deleteEmployeeModel(employeeModel);
	}

	@Override
	public List<EmployeeModel> queryAllEmployeeModel() throws Exception {
		return employeeDAO.queryAllEmployeeModel();
	}

	@Override
	public EmployeeModel queryEmployeeModelByKey(EmployeeModel employeeModel)
			throws Exception {
		return employeeDAO.queryEmployeeModelByKey(employeeModel);
	}

	@Override
	public void saveEmployeeModel(EmployeeModel employeeModel) throws Exception {
		employeeDAO.saveEmployeeModel(employeeModel);
	}

	@Override
	public void updateEmployeeModel(EmployeeModel employeeModel)
			throws Exception {
		employeeDAO.updateEmployeeModel(employeeModel);
	}

	@Override
	public List<EmployeeModel> queryPageEmployeeModel(int start, int limit)
			throws Exception {
		return employeeDAO.queryPageEmployeeModel(start, limit);
	}

	@Override
	public int queryEmployeeModelCount()
			throws Exception {
		return employeeDAO.queryEmployeeModelCount();
	}
}